﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using agvcontroller.Common.DataBase;
using agvcontroller.Log;

namespace agvcontroller.GUI
{
    /// <summary>
    /// Interaction logic for UCNodeViewer.xaml
    /// </summary>
    public partial class UCNodeViewer : UserControl
    {
        CAGVCDB AGVCDB;
        Logger Log = new Logger("GUI");

        public UCNodeViewer()
        {
            InitializeComponent();

            AGVCDB = CAGVCDB.getInstance();
            InitUI();
        }

        void InitUI()
        {
            try
            {
                dgNodeInfo.DataContext = AGVCDB.AGVCDataSet.Tables[CAGVCDB.TABLE_NODELIST];
            }
            catch (Exception ex)
            {
                Log.Exception(string.Format("[UCNodeViewer] Exception InitUI . {0}, {1}",ex.Message,ex.StackTrace));
            }

            Log.Info(string.Format("[UCNodeViewer]InitUI"));
        }
    }
}
